class RecoveryFromRouteHistory
{
    static getInstance()
    {
        if(!RecoveryFromRouteHistory.instance)
        {
            RecoveryFromRouteHistory.instance = new RecoveryFromRouteHistory();
        }
        return RecoveryFromRouteHistory.instance;
    }

    /**
     * 在页面显今天示历史数据
     * @param data
     */
    render( data )
    {
        data.forEach( function( value ,index )
        {

            OBJECT.routerEdgePoints[value.id] = value.router_edge_points;   //设置多边形的顶点
            //设置Router
            OBJECT.routerPonits[value.id]=[];
            OBJECT.routerPonits[value.id].points = value.routers;
            OBJECT.routerPonits[value.id].vehicleId = value.vehicle_id;
            OBJECT.routerPonits[value.id].driverId = value.driver_id;
            OBJECT.routerPonits[value.id].schedule = value.schedule;
            OBJECT.routerPonits[value.id].UpdateStatus = false;
            CONFIG.optimizeOrderpoints[value.id] = false;
            OBJECT.routersNameMap[value.id] = value.title;
            OBJECT.routersBgColorMap[value.id] = getRandomColor();
            Queue(value.id)

        },this);
    }

    /**
     * 画多边形
     * @param points
     * @param routerId
     */
    drwaPloygon(points ,routerId)
    {
        Polygon.draw( points, map ,routerId )
    }
}